package com.labot.dao.hibernate;

import java.util.Date;
import java.util.List;

import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;

import com.labot.dao.EnvioDao;
import com.labot.dao.FacturaDao;
import com.labot.dao.RoleDao;
import com.labot.model.Centro;
import com.labot.model.Envio;
import com.labot.model.EnvioBitacora;
import com.labot.model.Factura;
import com.labot.model.Role;
import com.labot.util.DateUtil;


/**
 * This class interacts with hibernate session to save/delete and
 * retrieve Role objects.
 *
 * @author <a href="mailto:bwnoll@gmail.com">Bryan Noll</a>
 * @author jgarcia (updated to hibernate 4)
 */
@Repository("FacturaDao")
public class FacturaDaoHibernate extends GenericDaoHibernate<Factura, Long> implements FacturaDao {

    /**
     * Constructor to create a Generics-based version using Role as the entity
     */
    public FacturaDaoHibernate() {
        super(Factura.class);
    }

	@Override
	public Factura saveFactura(Factura fac) {
		super.save(fac);
        getSession().flush();
        return fac;
	}

	
}
